#include "usart.h"
#include "bsp_led.h"


#define USART_MSG_TAB_LEN 1
 
typedef struct LEDCMD
{
    uint8_t ledname:7;/*1red,2green,3blue,4yellow,5purple,6cyan,7white*/
    uint8_t reserved:1;
    uint8_t cmd:3;/*0 off，1 toggle*/

}ledcmd;

typedef struct usart_msg
{
    uint8_t id;
    uint8_t *dataptr;
    uint8_t datalen; 
    bool rxflg;
}UsartMsgType;

extern UsartMsgType usartmsgtab[USART_MSG_TAB_LEN];  

void UsartLedCmdExc(void);
void INTcallback(uint8_t ary[],uint8_t len);
void Usart_INT_Handler(void); 
void usartMainloop(void);
